home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_05
/
1005113a
< prev
next >
Wrap
Text File
|
1992-03-03
|
1KB
|
40 lines
Listing 3
***************
void _far your_error_handler(
unsigned device_error,
unsigned dos_error,
unsigned _far *header
);
main()
{
/* Set up your handler as the handler */
_harderr( your_error_handler);
/* Remainder of your code */
}
void _far your_error_handler(
unsigned device_error, /* Device error code */
unsigned dos_error, /* Dos error code */
unsigned _far *header /* This is the device header */
)
{
/* Test the device error and the dos error, as appropriate */
/* Inside of your routine, you need to call one or more
of the following */
/* To retry */
_hardresume( _HARDERR_RETRY );
/* To abort */
_hardresume( _HARDERR_ABORT );
/* To ignore */
_hardresume(_HARDERR_IGNORE);
/* To return to DOS (continue with program) */
_hardretn( doserr );
}